package com.cloud.force.api.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Lang;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import com.cloud.force.api.entity.TaskListPart;
import com.cloud.force.common.driver.SimpleInlangDriver;
import com.cloud.force.common.utils.BaseMapperHelper;

public interface TaskListPartMapper extends BaseMapperHelper<TaskListPart> {

	@Select("select task_list_id, part_id from task_list_part where part_id in (#{parts})")
	@Lang(SimpleInlangDriver.class)
	@Results({ @Result(property = "taskListId", column = "task_list_id", javaType = Long.class),
			@Result(property = "partId", column = "part_id", javaType = Long.class) })
	List<TaskListPart> findTaskList(@Param("parts") List<Long> parts);
}